import './App.css';

import { Button, ConfigProvider } from 'antd';
import { useState } from 'react';
import zhCN from 'antd/locale/zh_CN';

import PDFReader from './PDFReader';

function App() {
  const [visible, setVisible] = useState(false);

  const onClickPreview = () => {
    setVisible(true);
  };

  return (
    <ConfigProvider locale={zhCN}>
      <div className="app">
        <Button type="primary" onClick={onClickPreview}>
          打开文件
        </Button>
        <PDFReader visible={visible} setVisible={setVisible} />
      </div>
    </ConfigProvider>
  );
}

export default App;
